# MySQL数据库配置
DB_CONFIG = {
    'host': 'localhost',        # MySQL服务器地址
    'port': 3306,              # MySQL端口号
    'user': 'root',            # MySQL用户名
    'password': '123456',      # MySQL密码，请修改为你的实际密码
    'database': 'crawler_py',  # 数据库名称
    'charset': 'utf8'       # 字符集
}

# 爬虫配置
CRAWLER_CONFIG = {
    'max_pages': 50,           # 最大爬取页数
    'delay': 1,                # 页面间延迟时间（秒）
    'save_csv': True,          # 是否保存CSV备份文件
    'save_mysql': True,        # 是否保存到MySQL数据库
}

# CSV文件配置
CSV_CONFIG = {
    'qcwy_java_file': 'csv/qcwy_java.csv',  # Java职位数据CSV文件路径
    'qcwy_python_file': 'csv/qcwy_python.csv',  # Python职位数据CSV文件路径
    'qcwy_go_file': 'csv/qcwy_go.csv',  # Go职位数据CSV文件路径
    'qcwy_c_file': 'csv/qcwy_c.csv',  # C/C++职位数据CSV文件路径
    'qcwy_javascript_file': 'csv/qcwy_javascript.csv',  # JavaScript职位数据CSV文件路径
    'qcwy_nodejs_file': 'csv/qcwy_nodejs.csv',  # NodeJs职位数据CSV文件路径
    'qcwy_web_file': 'csv/qcwy_web.csv',  # Web职位数据CSV文件路径
    'qcwy_front_file': 'csv/qcwy_front.csv',  # 前端职位数据CSV文件路径
    'qcwy_back_file': 'csv/qcwy_back.csv',  # 后端职位数据CSV文件路径
    'qcwy_test_file': 'csv/qcwy_test.csv',  # 测试职位数据CSV文件路径
    'qcwy_operations_file': 'csv/qcwy_operations.csv',  # 运维职位数据CSV文件路径
    'qcwy_all_file': 'csv/qcwy_all.csv',  # 全栈职位数据CSV文件路径
}

# 目标网站配置
TARGET_URL_JAVA = 'https://we.51job.com/pc/search?keyword=JAVA&searchType=2&sortType=0&metro='
TARGET_URL_PYTHON = 'https://we.51job.com/pc/search?keyword=Python&searchType=2&sortType=0&metro='
TARGET_URL_GO = 'https://we.51job.com/pc/search?keyword=Go&searchType=2&sortType=0&metro='
TARGET_URL_C = 'https://we.51job.com/pc/search?keyword=C/C++&searchType=2&sortType=0&metro='
TARGET_URL_JAVASCRIPT = 'https://we.51job.com/pc/search?keyword=JavaScript&searchType=2&sortType=0&metro='
TARGET_URL_NODEJS = 'https://we.51job.com/pc/search?keyword=NodeJs&searchType=2&sortType=0&metro='
TARGET_URL_WEB = 'https://we.51job.com/pc/search?keyword=Web&searchType=2&sortType=0&metro='
TARGET_URL_FRONT = 'https://we.51job.com/pc/search?keyword=前端&searchType=2&sortType=0&metro='
TARGET_URL_BACK = 'https://we.51job.com/pc/search?keyword=后端&searchType=2&sortType=0&metro='
TARGET_URL_TEST = 'https://we.51job.com/pc/search?keyword=测试&searchType=2&sortType=0&metro='
TARGET_URL_OPERATIONS = 'https://we.51job.com/pc/search?keyword=运维&searchType=2&sortType=0&metro='
TARGET_URL_ALL = 'https://we.51job.com/pc/search?keyword=全栈&searchType=2&sortType=0&metro='